package com.example.demo.service.impl;

import com.example.demo.dto.Carousel;
import com.example.demo.mapper.CarouselMapper;
import com.example.demo.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarouselServiceImpl implements CarouselService {
    private final CarouselMapper carouselMapper;

    @Autowired
    public CarouselServiceImpl(CarouselMapper carouselMapper) {
        this.carouselMapper = carouselMapper;
    }

    @Override
    public List<Carousel> getAllCarousel() {
        return carouselMapper.findAllCarousel();
    }
}
